#include "stc89c.h"
#include "intrins.h"

#define RELAY P10

void Delay1000ms()		//@11.0592MHz
{
	unsigned char i, j, k;

	_nop_();
	i = 8;
	j = 1;
	k = 243;
	do
	{
		do
		{
			while (--k);
		} while (--j);
	} while (--i);
}


void main(void)
{
	while(1)
	{
		//delay 1 s
		Delay1000ms();
		//change the state of P10(control the relay) bettwin ON and OFF
		RELAY = !RELAY;
	}
}